#-*-encoding=utf-8-*-
@script_attr(permission='zope.View', use_template='basic')
def index():
    """公司通讯录

None"""

    root = org_info.listOrgStructure()
    ous= root['ous']
    results = [{'title':root['title'], 'members':org_info.listOUOnelevelMembersDetail(root['id'])}]
    for ou in ous:
        results.append({'title':ou['title'], 
                        'members':org_info.listGroupMembersDetail(ou['id'])
                     })
    return render_template('txl', results=results)

